<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">

<div class="pageContent" id="jGridForFactory"></div>

<script type="text/javascript">
    $('#jGridForFactory').jGrid({
        layoutH: 135,
        base: hostUrl + '/management/factory/',
        url: 'getFactories',
        columns: [
            {field: 'siteCode', group: 'ids', type: 'checkbox', width: 22},
            {field: '_index', text: '序号', width: 40},
            {field: 'siteCode', text: '工厂编号', width: 100, query: true, css: 'toUp'},
            {field: 'siteText', text: '工厂描述', width: 100, query: true},
            {field: 'lockFlag', text: '锁定标记', width: 50, transform: function(data){
                if (data == 0) {
                    return '否';
                } else if (data == 1) {
                    return '是';
                }
                return data;
            }, query: true, queryType: 'select', queryOptions: [
                {value: '', label: '所有'},
                {value: 0, label: '否'},
                {value: 1, label: '是'}
            ]},
            {field: 'createUser', text: '创建人', width: 100},
            {field: 'createDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '创建时间', width: 100},
            {field: 'modifyUser', text: '修改人', width: 100},
            {field: 'modifyDateTime', type: 'date', format: 'yyyy-MM-dd HH:mm:ss', text: '修改时间', width: 100}
        ],
        gridbars: [
            {icon: 'add', text: '新增', title: '新建工厂', 
                target: 'dialog', href: 'createFactoryPage', data: {navTabId: "${navTabId!''}"}, mask: true, width: 640, height: 400},
            {icon: 'edit', text: '编辑', title: "编辑工厂", 
                target: 'dialog', href: 'factoryPage', data: {type: 'edit', siteCode: '{siteCode}', navTabId: '${navTabId!""}'}, mask: true, width: 580, height: 260},
            {icon: 'icon', text: '详情', title: "工厂详情", 
                target: 'dialog', href: 'factoryPage', data: {type: 'view', siteCode: '{siteCode}', navTabId: '${navTabId!""}'}, mask: true, width: 580, height: 260},
            {icon: 'delete', text: '删除（测试专用）', title: "确认要删除选择的工厂吗？", 
                target: 'selectedTodo', href: 'deleteFactory', data: {siteCodes: '{ids}', navTabId: '${navTabId!""}'}}
        ]
    });
</script>